import {localeProps} from '../../utils';

const name = 'table-form-column';

export default {
  icon: 'icon-cell',
  name,
  drag: true,
  dragBtn: false,
  mask: false,
  rule({t}) {
    return {
      type: 'tableFormColumn',
      props: {
        label: t('components.tableFormColumn.label'),
        width: 'auto'
      },
      children: []
    };
  },
  props(_, {t}) {
    return localeProps(t, name + '.props', [
      {
        type: 'input',
        field: 'label',
      },
      {
        type: 'input',
        field: 'width',
      },
      {
        type: 'ColorInput',
        title: '颜色',
        field: 'color',
      }
    ]);
  }
};
